ComparableNotNegativeAttribute
Ecng.ComponentModel
Indicates that a comparable value must not be negative when provided.
Herda de: ComparableValidationAttribute<T>
Métodos
Validate
protected override bool Validate(T? value, bool disableNullCheck)
result = comparableNotNegativeAttribute.Validate(value, disableNullCheck)
Validates that the value is not negative if it is provided.
- value
- The nullable value to validate.
- disableNullCheck
- A flag indicating whether null value should bypass validation.
Retorna: True if the value is null and null checks are disabled, or if the non-null value is not negative; otherwise, false.